import request from '@/utils/request'

// 查询餐馆列表
export function listResinfo(query) {
  return request({
    url: '/system/resinfo/list',
    method: 'get',
    params: query
  })
}

// 查询餐馆详细
export function getResinfo(resId) {
  return request({
    url: '/system/resinfo/' + resId,
    method: 'get'
  })
}

// 新增餐馆
export function addResinfo(data) {
  return request({
    url: '/system/resinfo',
    method: 'post',
    data: data
  })
}

// 修改餐馆
export function updateResinfo(data) {
  return request({
    url: '/system/resinfo',
    method: 'put',
    data: data
  })
}

// 删除餐馆
export function delResinfo(resId) {
  return request({
    url: '/system/resinfo/' + resId,
    method: 'delete'
  })
}

// 查询餐馆分类列表
export function listResCategory() {
  return request({
    url: '/system/rescategory/list',
    method: 'get'
  })
}
